﻿@model SendPrivateMessageModel
@using Nop.Web.Extensions;
@using Nop.Web.Models.PrivateMessages;
@{    
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AddTitleParts(T("PageTitle.SendPM").Text);
}
@using (Html.BeginForm())
{
    <div class="page private-message-send-page">
        <div class="page-title">
            <h1>@T("PrivateMessages.Send.PostMessage")</h1>
        </div>
        <div class="page-body">
            <div class="message-error">
                @Html.ValidationSummary(true)
            </div>
            @Html.HiddenFor(model => model.ToCustomerId)
            @Html.HiddenFor(model => model.ReplyToMessageId)
            <div class="fieldset">
                <div class="form-fields">
                    <div class="inputs">
                        <label>@T("PrivateMessages.Send.To")</label>
                        @if (Model.AllowViewingToProfile)
                        {
                            <a href="@Url.RouteUrl("CustomerProfile", new { id = Model.ToCustomerId })">@(Model.CustomerToName)</a>
                        }
                        else
                        {
                            @Model.CustomerToName
                        }
                    </div>
                    <div class="inputs">
                        <label>@T("PrivateMessages.Send.Subject")</label>
                        @Html.TextBoxFor(model => model.Subject, new { @class = "pm-title-text" })
                        @Html.ValidationMessageFor(model => model.Subject)
                    </div>
                    <div class="inputs message">
                        <label>@T("PrivateMessages.Send.Message")</label>
                        @Html.BBCodeEditor("Message")
                        @Html.TextAreaFor(model => model.Message, new { @class = "bb-editor-text", TextMode = "MultiLine" })
                        @Html.ValidationMessageFor(model => model.Message)
                    </div>
                </div>
                <div class="options">
                    <input type="submit" value="@T("PrivateMessages.Send.SendButton")" class="button-1 send-pm-button"/>
                    <input type="button" class="button-2 cancel-pm-button" value="@T("PrivateMessages.Send.CancelButton")" 
                           onclick="setLocation('@Url.RouteUrl("PrivateMessages")')" />
                </div>
            </div>
        </div>
    </div>
}